package com.itheima.springbootwebbtalis.aspect;

import lombok.experimental.Accessors;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Slf4j
@Aspect
@Component
public class AspectExecution {
    @Pointcut("execution(void  com.itheima.springbootwebbtalis.service.Impl.*ServiceImpl.*Remove(*))")
    //@Pointcut("@annotation(com.itheima.springbootwebbtalis.anno.MyLog)")
    public void gk(){

    }
    @Before("gk()")
    public void before(){
        log.info("前置通知 before....");
    }
    @After("gk()")
    public void after(){
        log.info("后置通知 after....");
    }
}
